add_definitions( -DPROJECT_NAME=${PROJECT_NAME} -DPROJECT_VERSION=${PROJECT_VERSION})

set(fwupd-backend_SRCS
    FwupdResource.cpp
    FwupdBackend.cpp
    FwupdTransaction.cpp
    FwupdSourcesBackend.cpp
)

add_library(fwupd-backend MODULE ${fwupd-backend_SRCS})
target_link_libraries(fwupd-backend Qt::Core KF5::CoreAddons KF5::ConfigCore Discover::Common PkgConfig::Fwupd)
if (Fwupd_VERSION VERSION_LESS 1.5.8)
    target_compile_definitions(fwupd-backend PRIVATE -DFWUPD_EXTERNC_REQUIRED)
endif()

install(TARGETS fwupd-backend DESTINATION ${KDE_INSTALL_PLUGINDIR}/discover)

